﻿using System;
using System.Collections.Generic;
using System.Text;

using RaisingStudio.Data;
using RaisingStudio.Data.Common;
using RaisingStudio.Data.Expressions;

namespace RaisingStudio.Data.Providers.Adapters.Generic
{
    /// <summary>
    /// DataItem adapter generic.
    /// </summary>
    public class DataItemAdapter<T> where T : RaisingStudio.Data.DataItem
    {
        #region Common property 
        protected RaisingStudio.Data.Providers.Adapters.DataItemAdapter adapter;
        /// <summary>
        /// DataItem DataAdapter.
        /// </summary>
        public RaisingStudio.Data.Providers.Adapters.DataItemAdapter Adapter
        {
            get
            {
                return this.adapter;
            }
        }

        /// <summary>
        /// DataItem Type.
        /// </summary>
        public System.Type DataItemType
        {
            get
            {
                return Adapter.DataItemType;
            }
        }

        /// <summary>
        /// database connection.
        /// </summary>
        public System.Data.IDbConnection Connection
        {
            get
            {
                return Adapter.Connection;
            }
        }

        /// <summary>
        /// database transaction manager.
        /// </summary>
        public TransactionManager TransactionManager
        {
            get
            {
                return Adapter.TransactionManager;
            }
        }

        /// <summary>
        /// Command builder.
        /// </summary>
        public RaisingStudio.Data.Common.Builders.CommandBuilder CommandBuilder
        {
            get
            {
                return Adapter.CommandBuilder;
            }
        }

        /// <summary>
        /// default Data table mapping.
        /// </summary>
        public System.Data.Common.DataTableMapping DefaultDataTableMapping
        {
            get
            {
                return Adapter.DefaultDataTableMapping;
            }
        }
        #endregion

        #region Constructor
        public DataItemAdapter(DataItemAdapter adapter)
        {
            this.adapter = adapter;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public DataItemAdapter()
        {
            this.adapter = new DataItemAdapter(typeof(T));
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="connection">database connection.</param>
        public DataItemAdapter(System.Data.IDbConnection connection)
        {
            this.adapter = new DataItemAdapter(typeof(T), connection);
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="transactionManager">database transaction manager.</param>
        public DataItemAdapter(TransactionManager transactionManager, ILogManager logManager)
        {
            this.adapter = new DataItemAdapter(typeof(T), transactionManager, logManager);
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="definitionName">object definition name.</param>
        public DataItemAdapter(string definitionName)
        {
            this.adapter = new DataItemAdapter(typeof(T), definitionName);
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="definitionName">object definition name.</param>
        /// <param name="connection">database connection.</param>
        public DataItemAdapter(string definitionName, System.Data.IDbConnection connection)
        {
            this.adapter = new DataItemAdapter(typeof(T), definitionName, connection);
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="definitionName">object definition name.</param>
        /// <param name="transactionManager">database transaction manager.</param>
        public DataItemAdapter(string definitionName, TransactionManager transactionManager, ILogManager logManager)
        {
            this.adapter = new DataItemAdapter(typeof(T), definitionName, transactionManager, logManager);
        }
        #endregion

        #region Transactions
        /// <summary>
        /// Begin Database transaction.
        /// </summary>
        /// <returns>The ID of transaction.</returns>
        public virtual string BeginTransaction()
        {
            return this.adapter.BeginTransaction();
        }

        /// <summary>
        /// Begin Database transaction.
        /// </summary>
        /// <param name="isolationLevel">Specifies the isolation level for the transaction.</param>
        /// <returns>The ID of transaction.</returns>
        public virtual string BeginTransaction(System.Data.IsolationLevel isolationLevel)
        {
            return this.adapter.BeginTransaction(isolationLevel);
        }

        /// <summary>
        /// Commit Database transaction.
        /// </summary>
        public virtual void CommitTransaction()
        {
            this.adapter.CommitTransaction();
        }

        /// <summary>
        /// Commit Database transaction.
        /// </summary>
        /// <param name="transactionID">The ID of transaction.</param>
        public virtual void CommitTransaction(string transactionID)
        {
            this.adapter.CommitTransaction(transactionID);
        }

        /// <summary>
        /// Rollback transaction.
        /// </summary>
        public virtual void RollbackTransaction()
        {
            this.adapter.RollbackTransaction();
        }

        /// <summary>
        /// Rollback transaction.
        /// </summary>
        /// <param name="transactionID">The ID of transaction.</param>
        public virtual void RollbackTransaction(string transactionID)
        {
            this.adapter.RollbackTransaction(transactionID);
        }
        #endregion

        #region Common Methods
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys)
        {
            return this.adapter.Fill(dataItem, primaryKeys);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Fill(dataItem);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys, string[] columnNames)
        {
            return this.adapter.Fill(dataItem, primaryKeys, columnNames);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.Fill(dataItem, columnNames);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys)
        {
            return (T)this.adapter.GetData(primaryKeys);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem)
        {
            return (T)this.adapter.GetData(dataItem);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys, string[] columnNames)
        {
            return (T)this.adapter.GetData(primaryKeys, columnNames);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return (T)this.adapter.GetData(dataItem, columnNames);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Insert(dataItem);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.Insert(dataItem, columnNames);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Delete(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Delete(dataItem);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Delete(object[] primaryKeys)
        {
            return this.adapter.Delete(primaryKeys);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Update(dataItem);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Update(primaryKeys, dataItem);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.Update(dataItem, columnNames);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.Update(primaryKeys, dataItem, columnNames);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool Exists(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Exists(dataItem);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool Exists(object[] primaryKeys)
        {
            return this.adapter.Exists(primaryKeys);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.Save(dataItem);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.Save(dataItem, columnNames);
        }

        #region Batch Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList()
        {
            return (List<T>)this.adapter.GetDataList();
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames)
        {
            return (List<T>)this.adapter.GetDataList(columnNames);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(CommonCommand conditionCommand)
        {
            return (List<T>)this.adapter.GetDataList(conditionCommand);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, CommonCommand conditionCommand)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionCommand);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(CommonCommand conditionCommand, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(conditionCommand, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, CommonCommand conditionCommand, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionCommand, startRecord, maxRecords);
        }
        #endregion

        #region 迭代器
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator()
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator();
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(CommonCommand conditionCommand)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionCommand);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, CommonCommand conditionCommand)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionCommand);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data objects.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data objects.</returns>
        public virtual IEnumerable<T> GetEnumerator(CommonCommand conditionCommand, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionCommand, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, CommonCommand conditionCommand, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionCommand, startRecord, maxRecords);
        }
        #endregion
        #endregion
        #endregion
        #endregion
        #region Transaction
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys, string transactionID)
        {
            return this.adapter.Fill(dataItem, primaryKeys, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Fill(dataItem, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys, string[] columnNames, string transactionID)
        {
            return this.adapter.Fill(dataItem, primaryKeys, columnNames, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.Fill(dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys, string transactionID)
        {
            return (T)this.adapter.GetData(primaryKeys, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return (T)this.adapter.GetData(dataItem, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys, string[] columnNames, string transactionID)
        {
            return (T)this.adapter.GetData(primaryKeys, columnNames, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return (T)this.adapter.GetData(dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Insert(dataItem, transactionID);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.Insert(dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Delete(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Delete(dataItem, transactionID);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Delete(object[] primaryKeys, string transactionID)
        {
            return this.adapter.Delete(primaryKeys, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Update(dataItem, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Update(primaryKeys, dataItem, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.Update(dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.Update(primaryKeys, dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool Exists(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Exists(dataItem, transactionID);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool Exists(object[] primaryKeys, string transactionID)
        {
            return this.adapter.Exists(primaryKeys, transactionID);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.Save(dataItem, transactionID);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.Save(dataItem, columnNames, transactionID);
        }

        #region Batch Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(CommonCommand conditionCommand, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(conditionCommand, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, CommonCommand conditionCommand, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionCommand, transactionID);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(CommonCommand conditionCommand, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(conditionCommand, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, CommonCommand conditionCommand, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionCommand, startRecord, maxRecords, transactionID);
        }
        #endregion

        #region 迭代器
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(CommonCommand conditionCommand, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionCommand, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, CommonCommand conditionCommand, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionCommand, transactionID);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(CommonCommand conditionCommand, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionCommand, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, CommonCommand conditionCommand, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionCommand, startRecord, maxRecords, transactionID);
        }
        #endregion
        #endregion
        #endregion
        #endregion

        #region Extension Functions
        #region Common Methods
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey)
        {
            return this.adapter.FillByPrimaryKey(dataItem, primaryKey);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey, string[] columnNames)
        {
            return this.adapter.FillByPrimaryKey(dataItem, primaryKey, columnNames);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey)
        {
            return (T)this.adapter.GetDataByPrimaryKey(primaryKey);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey, string[] columnNames)
        {
            return (T)this.adapter.GetDataByPrimaryKey(primaryKey, columnNames);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int DeleteByPrimaryKey(object primaryKey)
        {
            return this.adapter.DeleteByPrimaryKey(primaryKey);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem)
        {
            return this.adapter.UpdateByPrimaryKey(primaryKey, dataItem);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem, string[] columnNames)
        {
            return this.adapter.UpdateByPrimaryKey(primaryKey, dataItem, columnNames);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool ExistsByPrimaryKey(object primaryKey)
        {
            return this.adapter.ExistsByPrimaryKey(primaryKey);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(CommonCommand conditionCommand)
        {
            return (T)this.adapter.GetDataByCondition(conditionCommand);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(string[] columnNames, CommonCommand conditionCommand)
        {
            return (T)this.adapter.GetDataByCondition(columnNames, conditionCommand);
        }

        #region Epxression 
        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (T)this.adapter.GetDataByCondition(conditionExpression);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (T)this.adapter.GetDataByCondition(columnNames, conditionExpression);
        }

        #region Batch Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (List<T>)this.adapter.GetDataList(conditionExpression);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionExpression);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(conditionExpression, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionExpression, startRecord, maxRecords);
        }
        #endregion

        #region 迭代器
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionExpression);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionExpression);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the enumerator of data objects.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data objects.</returns>
        public virtual IEnumerable<T> GetEnumerator(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionExpression, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionExpression, startRecord, maxRecords);
        }
        #endregion
        #endregion
        #endregion

        #region column name Epxression 
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Fill(dataItem, primaryKeys, columnExpressions);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Fill(dataItem, columnExpressions);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys, ColumnExpression[] columnExpressions)
        {
            return (T)this.adapter.GetData(primaryKeys, columnExpressions);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return (T)this.adapter.GetData(dataItem, columnExpressions);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Insert(dataItem, columnExpressions);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Update(dataItem, columnExpressions);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Update(primaryKeys, dataItem, columnExpressions);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Save(dataItem, columnExpressions);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, startRecord, maxRecords);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Fill(dataItem, new object[] { primaryKey }, columnExpressions);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey, ColumnExpression[] columnExpressions)
        {
            return (T)this.adapter.GetData(new object[] { primaryKey }, columnExpressions);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions)
        {
            return this.adapter.Update(new object[] { primaryKey }, dataItem, columnExpressions);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>Data item.</returns>
        public virtual RaisingStudio.Data.DataItem GetDataByCondition(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return this.adapter.GetDataByCondition(columnExpressions, conditionExpression);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, conditionExpression);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, conditionExpression, startRecord, maxRecords);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, conditionExpression);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, conditionExpression, startRecord, maxRecords);
        }
        #endregion
        #endregion
        #endregion
        #region Transaction
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey, string transactionID)
        {
            return this.adapter.FillByPrimaryKey(dataItem, primaryKey, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey, string[] columnNames, string transactionID)
        {
            return this.adapter.FillByPrimaryKey(dataItem, primaryKey, columnNames, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey, string transactionID)
        {
            return (T)this.adapter.GetDataByPrimaryKey(primaryKey, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey, string[] columnNames, string transactionID)
        {
            return (T)this.adapter.GetDataByPrimaryKey(primaryKey, columnNames, transactionID);
        }

        /// <summary>
        /// Delete Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int DeleteByPrimaryKey(object primaryKey, string transactionID)
        {
            return this.adapter.DeleteByPrimaryKey(primaryKey, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem, string transactionID)
        {
            return this.adapter.UpdateByPrimaryKey(primaryKey, dataItem, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem, string[] columnNames, string transactionID)
        {
            return this.adapter.UpdateByPrimaryKey(primaryKey, dataItem, columnNames, transactionID);
        }

        /// <summary>
        /// Check the data item exists or not.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>If exists then return true, otherwise return false.</returns>
        public virtual bool ExistsByPrimaryKey(object primaryKey, string transactionID)
        {
            return this.adapter.ExistsByPrimaryKey(primaryKey, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(CommonCommand conditionCommand, string transactionID)
        {
            return (T)this.adapter.GetDataByCondition(conditionCommand, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionCommand">Condition Command.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(string[] columnNames, CommonCommand conditionCommand, string transactionID)
        {
            return (T)this.adapter.GetDataByCondition(columnNames, conditionCommand, transactionID);
        }

        #region Epxression 
        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (T)this.adapter.GetDataByCondition(conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (T)this.adapter.GetDataByCondition(columnNames, conditionExpression, transactionID);
        }

        #region Batch Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionExpression, transactionID);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(conditionExpression, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnNames, conditionExpression, startRecord, maxRecords, transactionID);
        }
        #endregion

        #region 迭代器
        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionExpression, transactionID);
        }

        #region Paging Operation 
        /// <summary>
        /// Gets the enumerator of data objects.
        /// </summary>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data objects.</returns>
        public virtual IEnumerable<T> GetEnumerator(RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(conditionExpression, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnNames">An array of Columns.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <param name="transactionID">The ID of transaction.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(string[] columnNames, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnNames, conditionExpression, startRecord, maxRecords, transactionID);
        }
        #endregion
        #endregion
        #endregion

        #region column name Epxression 
        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, object[] primaryKeys, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Fill(dataItem, primaryKeys, columnExpressions, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int Fill(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Fill(dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(object[] primaryKeys, ColumnExpression[] columnExpressions, string transactionID)
        {
            return (T)this.adapter.GetData(primaryKeys, columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="dataItem">Data item that contains primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetData(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return (T)this.adapter.GetData(dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Insert Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Insert(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Insert(dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Update(dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Update(object[] primaryKeys, RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Update(primaryKeys, dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Save Data item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int Save(RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Save(dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// FillData item.
        /// </summary>
        /// <param name="dataItem">Data item.</param>
        /// <param name="primaryKeys">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The result of execute command.</returns>
        public virtual int FillByPrimaryKey(RaisingStudio.Data.DataItem dataItem, object primaryKey, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Fill(dataItem, new object[] { primaryKey }, columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByPrimaryKey(object primaryKey, ColumnExpression[] columnExpressions, string transactionID)
        {
            return (T)this.adapter.GetData(new object[] { primaryKey }, columnExpressions, transactionID);
        }

        /// <summary>
        /// Update Data item.
        /// </summary>
        /// <param name="primaryKey">The value of primary key.</param>
        /// <param name="dataItem">Data item.</param>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <returns>The count of rows that updated.</returns>
        public virtual int UpdateByPrimaryKey(object primaryKey, RaisingStudio.Data.DataItem dataItem, ColumnExpression[] columnExpressions, string transactionID)
        {
            return this.adapter.Update(new object[] { primaryKey }, dataItem, columnExpressions, transactionID);
        }

        /// <summary>
        /// Gets Data item.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>Data item.</returns>
        public virtual T GetDataByCondition(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (T)this.adapter.GetDataByCondition(columnExpressions, conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets the list of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the list of data items.</returns>
        public virtual List<T> GetDataList(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (List<T>)this.adapter.GetDataList(columnExpressions, conditionExpression, startRecord, maxRecords, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, conditionExpression, transactionID);
        }

        /// <summary>
        /// Gets the enumerator of data items.
        /// </summary>
        /// <param name="columnExpressions">An array of column expressions.</param>
        /// <param name="conditionExpression">Condition expression</param>
        /// <param name="startRecord">The zero-based record number to start with. </param>
        /// <param name="maxRecords">The maximum number of records to retrieve. </param>
        /// <returns>the enumerator of data items.</returns>
        public virtual IEnumerable<T> GetEnumerator(ColumnExpression[] columnExpressions, RaisingStudio.Data.Expressions.ConditionExpression conditionExpression, int startRecord, int maxRecords, string transactionID)
        {
            return (IEnumerable<T>)this.adapter.GetEnumerator(columnExpressions, conditionExpression, startRecord, maxRecords, transactionID);
        }
        #endregion
        #endregion
        #endregion
        #endregion
    }
}
